<%-- 
    Document   : newMCQ
    Created on : 11/08/2011, 10:25:14 AM
    Author     : Lewis Kelly
--%>


<script language="javascript"> 
    //A function that checks the form
    function checkForm(){
        var question = document.getElementById('MCQuestion').value;
        if (question == ""){
            alert("Please fill in a question");
            return false;
        }
        return true;

    }
    

            
            
</script>

<style type="text/css">
    #thing{
        position:relative;
        left:70px;
        margin-top: 0px;
    }
    #i{
        margin-bottom:20px;
    }
    #buttons{

        position:relative;  
        bottom:70px;
        padding-top:155px;
        float:left;


    }

    #h{
        color:#006633;
        font-weight: bold;
    }

    #LForm{
        float:left;
        margin-top:0px;
        padding-top:5px;
        padding-left: 80px;
        padding-right: 30px;
        padding-bottom: 30px;
    }

    #hh{
        margin-top:5px;
    }

    #list{
        margin-left:11px;
        padding-left: 0px;
    }

    #i1{
        padding-left: 21px;
        padding-right: 20px;
    }

    #i3{
        padding-left:36px;
        padding-right:35px;
    }

    #i4{
        padding-left:19px;
        padding-right:19px;
    }

    #butt{
        margin-top: 15px;
    }

</style>
<!-- Includes -->
<%@ include file="../header.jsp" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" type="text/css" href="../style.css"/>

<!-- Start of content -->
<div id="content-container1">
    <div id="content">
        <!-- Content goes here -->
        <br />
        <h3 id="hh">Question Details</h3>
        <div id="LForm">

            <!-- Spring Form -->
            <form:form method="post" commandName="newMCQ" name="newMCQ"><br />
                <%Object temps = request.getParameter("pid");%>

                <!-- Hideen span to get value from controller -->
                <span hidden="true">
                    <form:input path='pollID' type='text' value='<%=temps%>'/>
                </span>

                <!-- The textbox for the question-->
                <label><b>Enter Question Text: </b></label><br /><form:input 
                    path="questionText" NAME="MCQuestion" SIZE="40"  id="MCQuestion"/><BR>
                <br />

                <!-- the dropdown menu for the graph type for the question-->
                <label><b>Graph Type: </b></label><br />
                <form:select id="chart" path="style">
                    <option id="selected">Pie</option>
                    <option id="type1">Vertical Bar</option>
                    <option id="type2">Horizontal Bar</option>
                </form:select> <br /><br />

                <!-- The submit Button -->
                <div id="butt"><INPUT TYPE=SUBMIT value="Submit" 
                                      onClick="return checkForm()">
                    <input type="reset"
                           id="Template5" value="Clear" /><br />
                </div>

                <ul id="list">
                    <li><p><a href="specialMCQ.html?pid=<%=temps%>">Add Special MC Question</a></p></li>
                </ul>


            </form:form>

            <!-- Back Button -->
            <p> <input type="button" value="Back" onClick="javascript: history.go(-1)"></p>
        </div>

    </div>

    <!-- Footer -->
    <%@ include file="../footer.jsp" %>